package com.charm.restaurant.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.charm.restaurant.common.Result;
import com.charm.restaurant.entity.Order;

/**
 * 订单服务接口
 */
public interface OrderService extends IService<Order> {

    /**
     * 用户下单
     */
    Result<String> submit(Order order);

    /**
     * 用户查询自己的订单
     */
    Result<Page<Order>> userPage(int page, int pageSize);

    /**
     * 商家查询订单
     */
    Result<Page<Order>> merchantPage(int page, int pageSize, String number, Integer status, String beginTime, String endTime);

    /**
     * 查询订单详情
     */
    Result<Order> getOrderDetail(Long id);

    /**
     * 接单
     */
    Result<String> acceptOrder(Long id);

    /**
     * 配送订单
     */
    Result<String> deliveryOrder(Long id);

    /**
     * 完成订单
     */
    Result<String> completeOrder(Long id);

    /**
     * 取消订单
     */
    Result<String> cancelOrder(Long id);

    /**
     * 支付订单
     */
    Result<String> payOrder(Long id);
}
